package day050626;

import java.util.Arrays;
import java.util.Comparator;
import java.util.Scanner;

public class Test11 {
    public static void main(String[] args) {
        int[] a=new int[5];

        //1.输入5个元素
        Scanner s=new Scanner(System.in);
        for (int i = 0; i < 5; i++) {
            System.out.println("请输入元素：");
            a[i]=s.nextInt();
        }



        double sum=0;
        //用for求和//从1到3 范围内求和//不要第一个和最后一个
        for (int i = 1; i < 4; i++) {
            sum= sum+a[i];
        }
        System.out.println(sum/ (a.length-2));





    }
}
